<template>
	<view>
		<view class="" style="padding: 0 20rpx;">
			<rich-text :nodes="agreementDetail"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '', //标题
				agreementDetail: '', //关于我们，隐私协议，用户协议
				parameterList: [{
						name: '新手指南',
						id: 'newhand'
					},
					{
						name: '关于我们',
						id: 'Aboutus'
					},
					{
						name: '问题反馈',
						id: 'Problemfeedback'
					},
					{
						name: '入驻协议',
						id: 'entryAgreement'
					},
					{
						name: '隐私协议',
						id: 'privacy_agreement'
					},
					{
						name: '用户协议',
						id: 'user_agreement'
					},
				],
			}
		},
		onLoad(e) {
			uni.setNavigationBarTitle({
				title: e.title
			})
			let code;
			this.parameterList.forEach(item => {
				if (item.name == e.title) {
					code = item.id
				}
			})
			uni.request({
				url: `https://api.fulewanjia.com/fulewanjia/ws/sysconfig/getInfo/byKey`,
				method: "GET",
				data: {
					key: code
				},
				success: (res) => {
					this.agreementDetail = res.data.data.remark
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #f8f8f8;
	}
</style>